package com.zmj.dto.req;


import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zmj
 * @date 2021-09-14 18:33
 * <p>
 * 校验测试
 */
@Data
public class ValidationReq {

    //字符串非空
    @NotBlank(message = "name非空!")
    private String name;

    //对象非空
    @NotNull(message = "age非空")
    private Integer age;


    @NotEmpty(message = "嵌套对象非空")
    @Valid
    private List<ValidationListReq> list;

}
